import Vue from 'vue'
import Router from 'vue-router'
// import { domain, fromNow } from './filters'
import App from './containers/app.vue'


// install router
Vue.use(Router)

// // register filters globally
// Vue.filter('fromNow', fromNow)
// test

// routing
var router = new Router()

router.map({
    '/work': {
        component: function (resolve) {
            require(['./containers/Work.vue'], resolve);
        }
    },
    '/grade': {
        component: function (resolve) {
            require(['./containers/Grade.vue'], resolve);
        }
    },
    '/concat': {
        component: function (resolve) {
            require(['./containers/Concat.vue'], resolve);
        }
    }
});

router.beforeEach(function () {
    window.scrollTo(0, 0);
});

router.redirect({
    '*': '/concat'
});

router.start(App, '#app')
